# -*- UTF-8 -*-
"""
@File:encrypt.py
@Description:
@Author:echohye
@Date:2022/02/28 20:26
"""
# md5加密
from django.conf import settings
import hashlib

def md5(data_string):
    obj = hashlib.md5(settings.SECRET_KEY.encode("utf-8"))
    obj.update(data_string.encode('utf-8'))
    return obj.hexdigest()